import { Outlet, type Route as TRoute, createFileRoute, useMatch } from '@tanstack/react-router';

export const Route = createFileRoute('/layout')({
  loader: () => {
    return 'Hello World';
  },
  component: IndexComponent,
});

function IndexComponent() {
  const match = useMatch({ from: Route.id });
  const data = Route.useLoaderData();
  return <div>{data}</div>;
}
